package my.tutorial.javacore.test.analytic;

import java.io.PrintStream;
/**
 * Java Test 3 Design pattern 
 */
public class LogManager {
	private java.io.PrintStream out;
	static private LogManager lmInstance = new LogManager(System.out);;

	private LogManager(PrintStream out) {
		this.out = out;
	}

	public void log(String msg) {
		out.println("INFO: "+msg);
	}


	static public LogManager getInstance() {
		return lmInstance;
	}
	
	public static void main(String[] args){
		LogManager.getInstance().log( "helo world" );
	}
}